﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ComparativoDevListGrid.ascx.cs"
 Inherits="UILGestion.Control.ComparativoDevListGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>


<asp:Panel runat="server" ID="Panelcomparativo"  >
<asp:DataPager ID="pager" PagedControlID="ComparativoListView" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ComparativoListView" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer"   border="0"   runat="server"  >
            
            <tr id="Tr1" runat="server" class="ms-crm-List-Header" >
            
                
                <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" CommandArgument="fecha" runat="server">Fecha</asp:LinkButton>
                    </th>
                <th id="Th3" runat="server" align="right" >
                    <asp:LinkButton ID="lb3" CommandName="Sort" CommandArgument="totalBaseAprov" runat="server">Total Comparativo </asp:LinkButton>
                </th>
                
                <th id="Th4" runat="server" align="right">
                    <asp:LinkButton ID="LinkButton2"  CommandName="Sort" CommandArgument="totalBaseItem" runat="server">Total Devolucion</asp:LinkButton>
                </th>
                
                <th id="Th6" runat="server">
                    <asp:LinkButton ID="LinkButton4"  CommandName="Sort" CommandArgument="motivoStr" runat="server">Motivo</asp:LinkButton>
                </th>
                 <th id="Th1" runat="server">
                    <asp:LinkButton ID="LinkButton6"  CommandName="Sort" CommandArgument="descripcionStr" runat="server">Descripcion</asp:LinkButton>
                </th>
               
                     

            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr  style='border-color:Silver;background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>
            <%--<td width="90px">
              <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"numDocumento").ToString()%>'  
                 Target="_self"  ID="Comparativo"
                NavigateUrl='<%# "~/ObraAdmin/ComparativoReadForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idinternal").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
               />   
            </td>--%>
            <td >
                <%# Eval("fechaStr")%><br />
            </td>
            <td  align="right"  width="150px">
            Base:<%# Eval("totalBaseAprovStr")%><br />

            Aprobado:<%# Eval("totalAprovStr")%><br />
            </td>
            
            <td align="right" width="95px">
                          
           <%# Eval("totalDevolucionStr")%><br />
            </td>
           
          
          
            <td Width="150px">
                <%# Eval("motivoStr")%>
            </td>
           <%--  <td Width="50px">
                <%# Eval("totalDevolucionMon")%>
            </td>--%>
           
           <%-- <td >
                   <asp:ImageButton runat= "server" 
               
                 Target="_self"  ID="Hyperlink1"
                PostBackUrl='<%# "~/ObraAdmin/ComparativoEditForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idInternal").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 

                
                 CssClass="GridIcon ico-edit" BorderStyle="None" ImageUrl="~/Images/listing/ico-edit.png"
               />  
                                  
            </td>--%>
            <%--<td>
                <asp:HyperLink ID="AddressLink" runat="server" Target="_blank" NavigateUrl='<%# "http://www.google.com/maps?q=" + Eval("Address") + ",+" + Eval("CityStateZip") %>'
                    Text='<%# Eval("Address") %>'></asp:HyperLink>
                <br />
                <%# Eval("CityStateZip") %>
            </td>--%>
            <td>
                <asp:Repeater ID="recursos" runat="server" DataSource='<%# Eval("items") %>'>
                    <ItemTemplate>
                    <table>
                    <tr>
                    <td  width="350px"> <%# ((BOL.ComparativoDevItemInfo)Container.DataItem).Codigo%>
                    - <%# ((BOL.ComparativoDevItemInfo)Container.DataItem).descripcion%>
                    </td>
                      <td width="75px" align="right">
                    Cantidad:<%# ((BOL.ComparativoDevItemInfo)Container.DataItem).disponiblecantStr%><br />
                    </td>
                    <td width="95px" align="right"> 
                    Total:   <%# ((BOL.ComparativoDevItemInfo)Container.DataItem).disponibleStr%><br />
                     </td>
                  
                    </tr>
                    </table>

                        
                    </ItemTemplate>
                </asp:Repeater>
                
            </td>
            
           <%-- <td>
                <asp:HyperLink ID="HyperLink1" runat="server" 
                    ToolTip="Add to/Remove from Active Tag"><%# (bool)Eval("HasTag") ? "Remove" : "Add" %></asp:HyperLink>
            </td>--%>
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                     <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>



</asp:Panel>

    
     